home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-09 | 83.9 KB | 2,677 lines |
- diff -u -r --new-file last-version/docs/DIAGNOSIS.txt samba-1.9.14alpha9/docs/DIAGNOSIS.txt
- --- last-version/docs/DIAGNOSIS.txt Sun Jul 2 20:32:08 1995
- +++ samba-1.9.14alpha9/docs/DIAGNOSIS.txt Fri Jul 7 08:34:33 1995
- @@ -103,7 +103,7 @@
- TEST 5:
- -------
-
- -run the command "nmbd -L ACLIENT -B ACLIENT"
- +run the command "nmbd -L '*' -B ACLIENT"
-
- You should get a "positive name query response" from the PC. If you
- don't then the client software on the PC isn't installed correctly, or
- @@ -115,12 +115,14 @@
- TEST 6:
- -------
-
- -run the command "nmbd -L ACLIENT"
- +run the command "nmbd -L '*'"
-
- This time we are trying the same as the previous test but are trying
- -it via a broadcast to the default broadcast address.
- +it via a broadcast to the default broadcast address. All Netbios/TCPIP
- +hosts on the network should respond, although Samba may not catch all
- +of the responses in the short time it listens.
-
- -If this doesn't give the same result as the previous test then nmbd
- +If this doesn't give a similar result to the previous test then nmbd
- isn't correctly getting your broadcast address through its automatic
- mechanism. In this case you should experiment with the -B option which
- allows you to manually specify the broadcast address, overriding the
- @@ -242,9 +244,14 @@
- ADDITIONAL NOTES
- ----------------
-
- -NOTE 1: If you have version 1.9.13 of Samba then the "nmbd -L ACLIENT
- --B ACLIENT" test may fail if your client doesn't export any shares. To
- +NOTE 1:
- +
- +If you have version 1.9.13 of Samba then the "nmbd -L ACLIENT -B
- +ACLIENT" test may fail if your client doesn't export any shares. To
- fix this either export a share or change the "lookup_type" in
- nameserv.c from ' ' to 0 and recompile.
-
- +Also the "wildcard" lookup capability used in the command "nmbd -L
- +'*'" was only added in 1.9.14. If you have 1.9.13 then use a clients
- +netbios name instead (for example "nmbd -L ACLIENT").
-
- diff -u -r --new-file last-version/docs/INSTALL.txt samba-1.9.14alpha9/docs/INSTALL.txt
- --- last-version/docs/INSTALL.txt Fri Jun 30 12:18:47 1995
- +++ samba-1.9.14alpha9/docs/INSTALL.txt Fri Jul 7 08:30:27 1995
- @@ -258,6 +258,13 @@
- The best solution is, however, to fix the nmbd setup. Experimentation
- and careful reading of the Samba docs should help.
-
- +SCOPE IDs
- +=========
- +
- +By default Samba uses a blank scope ID. This means all your windows
- +boxes must also have a blank scope ID. If you really want to use a
- +non-blank scope ID then you will need to use the -i <scope> option to
- +nmbd, smbd, and smbclient.
-
- CHOOSING THE PROTOCOL LEVEL
- ===========================
- Only in last-version/docs: PASSWORDS.txt
- diff -u -r --new-file last-version/docs/Passwords.txt samba-1.9.14alpha9/docs/Passwords.txt
- --- last-version/docs/Passwords.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/docs/Passwords.txt Fri Jun 30 12:06:06 1995
- @@ -0,0 +1,42 @@
- +NOTE ABOUT PASSWORDS
- +====================
- +
- +Unix systems use a wide variety of methods for checking the validity
- +of a password. This is primarily controlled with the Makefile defines
- +mentioned in the Makefile.
- +
- +Also note that some clients (notably WfWg) uppercase the password
- +before sending it. The server tries the password as it receives it and
- +also after lowercasing it.
- +
- +The Samba server can also be configured to try different
- +upper/lowercase combinations. This is controlled by the [global]
- +parameter "password level". A level of N means to try all combinations
- +up to N uppercase characters in the password. A high value can chew a
- +fair bit of CPU time and can lower the security of your system. Do not
- +use this options unless you really need it - the time taken for
- +password checking can become so high that clients time out.
- +
- +If you do use the "password level" option then you might like to use
- +-DUFC_CRYPT in your Makefile. On some machine this makes password
- +checking _much_ faster. This is also useful if you use the @group
- +syntax in the user= option.
- +
- +If your site uses AFS (the Andrew File System), you can use the AFS section
- +in the Makefile. This will first attempt to authenticate a username and
- +password to AFS. If that succeeds, then the associated AFS rights will be
- +granted. Otherwise, the password checking routine falls back to whatever
- +Unix password checking method you are using. Note that the AFS code is
- +only written and tested for AFS 3.3 and later.
- +
- +
- +SECURITY = SERVER
- +=================
- +
- +Samba can use a remote server to do it's username/password
- +validation. This allows you to have one central machine (for example a
- +NT box) control the passwords for the Unix box.
- +
- +See the section on "security =" in smb.conf(5) for details.
- +
- +
- Only in last-version/docs: SPEED.txt
- Only in last-version/docs: SUPPORT.txt
- diff -u -r --new-file last-version/docs/Speed.txt samba-1.9.14alpha9/docs/Speed.txt
- --- last-version/docs/Speed.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/docs/Speed.txt Mon Jul 3 18:37:33 1995
- @@ -0,0 +1,260 @@
- +This file tries to outline the ways to improve the speed of a Samba server.
- +
- +Andrew Tridgell
- +January 1995
- +
- +
- +COMPARISONS
- +-----------
- +
- +The Samba server uses TCP to talk to the client. Thus if you are
- +trying to see if it performs well you should really compare it to
- +programs that use the same protocol. The most readily available
- +programs for file transfer that use TCP are ftp or another TCP based
- +SMB server.
- +
- +If you want to test against something like a NT or WfWg server then
- +you will have to disable all but TCP on either the client or
- +server. Otherwise you may well be using a totally different protocol
- +(such as Netbeui) and comparisons may not be valid.
- +
- +Generally you should find that Samba performs similarly to ftp at raw
- +transfer speed. It should perform quite a bit faster than NFS,
- +although this very much depends on your system.
- +
- +Several people have done comparisons between Samba and Novell, NFS or
- +WinNT. In some cases Samba performed the best, in others the worst. I
- +suspect the biggest factor is not Samba vs some other system but the
- +hardware and drivers used on the various systems. Given similar
- +hardware Samba should certainly be competitive in speed with other
- +systems.
- +
- +
- +SOCKET OPTIONS
- +--------------
- +
- +There are a number of socket options that can greatly affect the
- +performance of a TCP based server like Samba.
- +
- +The socket options that Samba uses are settable both on the command
- +line with the -O option, or in the smb.conf file.
- +
- +The "socket options" section of the smb.conf manual page describes how
- +to set these and gives recommendations.
- +
- +Getting the socket options right can make a big difference to your
- +performance, but getting them wrong can degrade it by just as
- +much. The correct settings are very dependent on your local network.
- +
- +The socket option TCP_NODELAY is the one that seems to make the
- +biggest single difference for most networks. Many people report that
- +adding "socket options = TCP_NODELAY" doubles the read performance of
- +a Samba drive. The best explanation I have seen for this is that the
- +Microsoft TCP/IP stack is slow in sending tcp ACKs.
- +
- +
- +READ SIZE
- +---------
- +
- +The option "read size" affects the overlap of disk reads/writes with
- +network reads/writes. If the amount of data being transferred in
- +several of the SMB commands (currently SMBwrite, SMBwriteX and
- +SMBreadbraw) is larger than this value then the server begins writing
- +the data before it has received the whole packet from the network, or
- +in the case of SMBreadbraw, it begins writing to the network before
- +all the data has been read from disk.
- +
- +This overlapping works best when the speeds of disk and network access
- +are similar, having very little effect when the speed of one is much
- +greater than the other.
- +
- +The default value is 16384, but very little experimentation has been
- +done yet to determine the optimal value, and it is likely that the best
- +value will vary greatly between systems anyway. A value over 65536 is
- +pointless and will cause you to allocate memory unnecessarily.
- +
- +
- +MAX XMIT
- +--------
- +
- +At startup the client and server negotiate a "maximum transmit" size,
- +which limits the size of nearly all SMB commands. You can set the
- +maximum size that Samba will negotiate using the "max xmit = " option
- +in smb.conf.
- +
- +It defaults to 65536 bytes (the maximum), but it is possible that some
- +clients may perform better with a smaller transmit unit. Trying values
- +of less than 2048 is likely to cause severe problems.
- +
- +In most cases the default is the best option.
- +
- +
- +LOCKING
- +-------
- +
- +By default Samba does not implement strict locking on each read/write
- +call (although it did in previous versions). If you enable strict
- +locking (using "strict locking = yes") then you may find that you
- +suffer a severe performance hit on some systems.
- +
- +The performance hit will probably be greater on NFS mounted
- +filesystems, but could be quite high even on local disks.
- +
- +
- +LOG LEVEL
- +---------
- +
- +If you set the log level (also known as "debug level") higher than 2
- +then you may suffer a large drop in performance. This is because the
- +server flushes the log file after each operation, which can be very
- +expensive.
- +
- +
- +WIDE LINKS
- +----------
- +
- +The "wide links" option is now enabled by default, but if you disable
- +it (for better security) then you may suffer a performance hit in
- +resolving filenames. The performance loss is lessened if you have
- +"getwd cache = yes", which is now the default.
- +
- +
- +READ RAW
- +--------
- +
- +The "read raw" operation is designed to be an optimised, low-latency
- +file read operation. A server may choose to not support it,
- +however. and Samba makes support for "read raw" optional, with it
- +being enabled by default.
- +
- +In some cases clients don't handle "read raw" very well and actually
- +get lower performance using it than they get using the conventional
- +read operations.
- +
- +So you might like to try "read raw = no" and see what happens on your
- +network. It might lower, raise or not affect your performance. Only
- +testing can really tell.
- +
- +
- +WRITE RAW
- +---------
- +
- +The "write raw" operation is designed to be an optimised, low-latency
- +file write operation. A server may choose to not support it,
- +however. and Samba makes support for "write raw" optional, with it
- +being enabled by default.
- +
- +Some machines may find "write raw" slower than normal write, in which
- +case you may wish to change this option.
- +
- +READ PREDICTION
- +---------------
- +
- +Samba can do read prediction on some of the SMB commands. Read
- +prediction means that Samba reads some extra data on the last file it
- +read while waiting for the next SMB command to arrive. It can then
- +respond more quickly when the next read request arrives.
- +
- +This is disabled by default. You can enable it by using "read
- +prediction = yes".
- +
- +Note that read prediction is only used on files that were opened read
- +only.
- +
- +Read prediction should particularly help for those silly clients (such
- +as "Write" under NT) which do lots of very small reads on a file.
- +
- +Samba will not read ahead more data than the amount specified in the
- +"read size" option. It always reads ahead on 1k block boundaries.
- +
- +
- +MEMORY MAPPING
- +--------------
- +
- +Samba supports reading files via memory mapping them. One some
- +machines this can give a large boost to performance, on others it
- +makes not difference at all, and on some it may reduce performance.
- +
- +To enable you you have to recompile Samba with the -DUSE_MMAP=1 option
- +on the FLAGS line of the Makefile.
- +
- +Note that memory mapping is only used on files opened read only, and
- +is not used by the "read raw" operation. Thus you may find memory
- +mapping is more effective if you disable "read raw" using "read raw =
- +no".
- +
- +
- +SLOW CLIENTS
- +------------
- +
- +One person has reported that setting the protocol to COREPLUS rather
- +than LANMAN2 gave a dramatic speed improvement (from 10k/s to 150k/s).
- +
- +I suspect that his PC's (386sx16 based) were asking for more data than
- +they could chew. I suspect a similar speed could be had by setting
- +"read raw = no" and "max xmit = 2048", instead of changing the
- +protocol. Lowering the "read size" might also help.
- +
- +
- +SLOW LOGINS
- +-----------
- +
- +Slow logins are almost always due to the password checking time. Using
- +the lowest practical "password level" will improve things a lot. You
- +could also enable the "UFC crypt" option in the Makefile.
- +
- +CLIENT TUNING
- +-------------
- +
- +Often a speed problem can be traced to the client. The client (for
- +example Windows for Workgroups) can often be tuned for better TCP
- +performance.
- +
- +See your client docs for details. In particular, I have heard rumours
- +that the WfWg options TCPWINDOWSIZE and TCPSEGMENTSIZE can have a
- +large impact on performance.
- +
- +Also note that some people have found that setting DefaultRcvWindow in
- +the [MSTCP] section of the SYSTEM.INI file under WfWg to 3072 gives a
- +big improvement. I don't know why.
- +
- +My own experience wth DefaultRcvWindow is that I get much better
- +performance with a large value (16384 or larger). Other people have
- +reported that anything over 3072 slows things down enourmously. One
- +person even reported a speed drop of a factor of 30 when he went from
- +3072 to 8192. I don't know why.
- +
- +It probably depends a lot on your hardware, and the type of unix box
- +you have at the other end of the link.
- +
- +MY RESULTS
- +----------
- +
- +Some people want to see real numbers in a document like this, so here
- +they are. I have a 486sx33 client running WfWg 3.11 with the 3.11b
- +tcp/ip stack. It has a slow IDE drive and 20Mb of ram. It has a SMC
- +Elite-16 ISA bus ethernet card. The only WfWg tuning I've done is to
- +set DefaultRcvWindow in the [MSTCP] section of system.ini to 16384. My
- +server is a 486dx3-66 running Linux. It also has 20Mb of ram and a SMC
- +Elite-16 card. You can see my server config in the examples/tridge/
- +subdirectory of the distribution.
- +
- +I get 490k/s on reading a 8Mb file with copy.
- +I get 441k/s writing the same file to the samba server.
- +
- +Of course, there's a lot more to benchmarks than 2 raw throughput
- +figures, but it gives you a ballpark figure.
- +
- +I've also tested Win95 and WinNT, and found WinNT gave me the best
- +speed as a samba client. The fastest client of all (for me) is
- +smbclient running on another linux box. Maybe I'll add those results
- +here someday ...
- +
- +
- +COMMENTS
- +--------
- +
- +If you've read this far then please give me some feedback! Which of
- +the above suggestions worked for you?
- +
- +Mail the samba mailing list or Andrew.Tridgell@anu.edu.au
- diff -u -r --new-file last-version/docs/Support.txt samba-1.9.14alpha9/docs/Support.txt
- --- last-version/docs/Support.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/docs/Support.txt Fri Jun 23 19:52:09 1995
- @@ -0,0 +1,190 @@
- +The Samba Consultants List
- +==========================
- +
- +I often get asked about paid support for Samba. I don't have the
- +time/inclination to do this myself at the moment, so I decided to
- +compile a list of people who are prepared to install/support Samba.
- +
- +Being on this list does not imply any sort of endorsement, I just
- +provide this list in the hope that it will be useful.
- +
- +If you want to be added to the list, or want your entry modified then
- +contact me at the address below. I am currently listing them in the
- +order that I have received them. If it gets too big I may organise it
- +by region.
- +
- +Andrew.Tridgell@anu.edu.au
- +
- +
- +
- +------------------------------------------------------------------------------
- +BRISBANE - AUSTRALIA
- +
- +Brett Worth
- +Select Computer Technology - Brisbane
- +431 Logan Road
- +Stones Corner QLD 4120
- +E-Mail: brett@sct.com.au
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +CANBERRA - AUSTRALIA
- +
- +Paul Blackman (ictinus@lake.canberra.edu.au, Ph. 06 2012518) is
- +available for consultation. Paul's Samba background is with
- +Solaris 2.3/4 and WFWG/Win95 machines. Paul is also the maintainer
- +of the SAMBA Web Pages.
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +READING - ENGLAND
- +
- +Philip Hands | E-Mail: info@hands.com
- +Philip Hands Computing Ltd. | Tel: +44 1734 476287 Fax: 1734 474655
- +Unit 1, Cherry Close, Caversham, Reading RG4 8UP UK
- +
- +Samba experience: SVR4,SVR3.2 & Linux <--> WfWg, W3.1, OS2 and MS-LanMan
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +Information One, Inc.
- +736 Hinman Ave, Suite 2W
- +Evanston, IL 60202
- +708-328-9137 708-328-0117 FAX
- +info@info1.com
- +
- +Providing custom Internet and networking solutions.
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +Olympic Peninsula Consulting; 1241 Lansing Ave W., Bremerton, WA 98312-4343
- +telephone 1+ 360 792 6938; mailto:opc@aa.net; http://www.aa.net/~opc;
- +Unix Systems and TCP/IP Network design, programming, and administration.
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +SolutionS R Us has been in business for 3+ years providing viable 3rd
- +party support in system/network administration. With our own Linux
- +distribution which we're constantly improving to make it the best and
- +using it to provide total solutions for companies which are open to
- +using Linux.
- +
- +Mauro DePalma <mauro@sru.com>
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +BIELEFELD - GERMANY
- +
- +I am located in Bielefeld/Germany and have been doing Unix consultancy
- +work for the past 8 years throughout Germany and the rest of Europe. I
- +can be contacted by email at <jpm@mens.de> or via phone at +49 521
- +9225922 or telefax at +49 521 9225924.
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +CANBERRA - AUSTRALIA
- +
- +Ben Elliston
- +Faculty of Information Sciences and Engineering
- +University of Canberra AUSTRALIA
- +E-mail: ben@ise.canberra.edu.au (Uni)
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +PALERMO - ITALY
- +
- +Francesco Cardinale
- +E-Mail: cardinal@palermo.italtel.it
- +Samba experience: SVR3.2, SOLARIS, ULTRIX, LINUX <--> DOS LAN-MAN, WFW
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +SYDNEY - AUSTRALIA
- +
- +John Terpstra - Aquasoft (jht@aquasoft.com.au)
- +Business: +612 524 4040
- +Home: +612 540 3154
- +Shoephone: +612 414 334422 (aka 0414 334422)
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +ONTARIO - CANADA
- +
- +Strata Software Limited, Kanata Ontario CANADA
- +Tel: +1 (613) 591-1922 Fax: +1 (613) 591-3485
- +Email: sales@strataware.com WWW: http://www.strataware.com/
- +
- +Strata Software Limited is a software development and consulting group
- +specializing in data communications (TCP/IP and OSI), X.400, X.500 and
- +LDAP, and X.509-based security. We have Samba experience with Windows NT,
- +Windows 95, and Windows for Workgroups clients with Linux, Unixware
- +(SVR4), and HP-UX servers.
- +------------------------------------------------------------------------------
- +
- +-----------------------------------------------------------------------
- +SYDNEY - AUSTRALIA
- +
- +We are a Unix & Windows developer with a consulting & support component.
- +In business since 1981 with experience on Sun, hp, sgi, IBM rs6000 plus
- +Windows, NT and Win95, Using Samba since September 94.
- +CodeSmiths, 22 Darley Road, MANLY 2095 NSW; 977 1979; fax: 977 2116
- +philm@esi.com.au (Australia; New South Wales; SYDNEY; North East)
- +-----------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +EDINBUGH - SCOTLAND
- +
- +Charlie Hussey email charlie@edina.demon.co.uk
- +Edina Software Limited tel 0131 657 1129
- +4 James Street fax 0131 669 9092
- +Edinburgh EH15 2DS
- +
- +SAMBA experience: SCO UNIX <=> WfWg
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +LONDON - ENGLAND
- +
- +Mark H. Preston,
- +Network Analyst, | Email : mpreston@sghms.ac.uk
- +Computer Unit, | Tel : +44 (0)181 725-5434
- +St. George's Hospital Med School, | Fax : +44 (0)181 725-3583
- +London SW17 ORE. | WWW : http://www.sghms.ac.uk
- +
- +Samba Experience:
- +Server: Solaris 2.3 & 2.4, Irix 5.2 & 5.3
- +Client: WinNT, Win95, WfWg, Win3.1, Ms-LanMan, DHCP support
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +SYDNEY - AUSTRALIA
- +
- +Pacific ESI has used and installed Samba since 1.6 on a range
- +of machines running SunOS, BSD/OS, SCO/UNIX, HP/UX, and Solaris,
- +and WfWG and Windows95. The largest system worked on to date
- +involved an Australia wide network of machines with PCs and SUNs
- +at the various nodes. The in-house testing site is a wide area
- +network with three sites, remotely connected with PPP and with
- +SUN servers at each site to all of which are connected several
- +PCs running mainly WfWG.
- +
- +Stefan Kjellberg Pacific Engineering Systems
- +International
- +info@eram.esi.com.au Voice:+61-2-9063377
- +... Fax:+61-2-9063468
- +------------------------------------------------------------------------------
- +
- +------------------------------------------------------------------------------
- +CHANTILLY - USA
- +
- +Intelligent Decisions, Inc.
- +ATTN: Richard Bullington
- +14121 Parke Long Ct. #104
- +Chantilly, VA 22021
- +U.S.A.
- +(703) 803-8070
- +rbullington@intdec.com
- +
- +Samba experience: Linux, DEC ULTRIX <=> WFWG 3.11, Windows NT 3.5
- +Specializing in World Wide Web related UNIX-to-PC connectivity.
- +------------------------------------------------------------------------------
- Only in last-version/docs: WARP.txt
- Only in last-version/docs: WINNT.txt
- diff -u -r --new-file last-version/docs/Warp.txt samba-1.9.14alpha9/docs/Warp.txt
- --- last-version/docs/Warp.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/docs/Warp.txt Sun Mar 26 10:25:55 1995
- @@ -0,0 +1,99 @@
- +Here is some advice from maxfield@ctelcom.uucp.netcom.com (Wade Maxfie
- +to use Samba with OS/2 Warp.
- +
- +Note that you may also find ftp://ftp.cdrom.com/pub/os2/new/os2net.faq
- +useful.
- +
- +
- +
- + Can I use Samba with Warp?
- +
- + Yes. The MSClient software at ftp.microsoft.com in the Bussys
- +(lanman os2 directory) will work, sort of. It is version 2.2c.
- +
- + First, uncloack os2ver. (attrib -h -r -s c:\os2ver). It is a
- +text file. change netwksta.xxx to 20=netwksta.sys. Also add
- +20=setup.exe. Another change will be needed, a .vdd file. I remember
- +it came up during the installation as being a wrong version. I wrote
- +the name down, changed os2ver to include it, and restarted the
- +installation.
- +
- + Here is a copy of my os2ver
- +
- +setup.exe
- +netbios.os2
- +nwifs.ifs
- +netwksta.sys
- +nwreq.sys
- +netbios.sys
- +ipx.sys
- +netvdd.sys
- +
- +Re-cloak os2ver. (attrib +h +r +s c:\os2ver)
- +
- +Run the installation from an OS/2 Box. Note that your mouse wont work,
- +use the TAB key to move around, enter to select hilighted items.
- +
- +Here is a copy of my Config.sys file regarding the Laman entries.
- +Note even though the version is 2.2c, it reports 2.2a in the text.
- +
- +REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN 2.
- +DEVICE=C:\LANMAN\DRIVERS\PROTMAN\PROTMAN.OS2 /i:C:\LANMAN
- +DEVICE=C:\LANMAN\DRIVERS\ETHERNET\Ns2000\Ns2000.OS2
- +RUN=C:\LANMAN\DRIVERS\PROTOCOL\tcpip\starttcp.exe
- +RUN=C:\LANMAN\DRIVERS\PROTOCOL\tcpip\startnb.exe
- +DEVICE=C:\LANMAN\DRIVERS\PROTOCOL\tcpip\tcpdrv.os2
- +DEVICE=C:\LANMAN\DRIVERS\PROTOCOL\tcpip\nbdrv.os2
- +DEVICE=C:\LANMAN\DRIVERS\PROTOCOL\tcpip\nmdrv.os2
- +DEVICE=C:\LANMAN\arpa\sockdrv.os2
- +DEVICE=C:\LANMAN\DRIVERS\PROTOCOL\NETBEUI\NETBEUI.OS2
- +DEVICE=C:\LANMAN\NETPROG\RDRHELP.SYS
- +IFS=C:\LANMAN\NETPROG\NETWKSTA.SYS /i:C:\LANMAN
- +DEVICE=C:\LANMAN\NETPROG\NETVDD.SYS
- +REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN 2.
- +
- +
- + If you have an NE2000 card, don't reboot, or you'll be sorry.
- +enable the automatic backup mechanism for recovering old config.sys and
- +other files in OS/2. It paid for itself during this installation nightm
- +before I knew better!)
- +
- + Next, (or perhaps before this), if you have an NE2000 adaptor,
- +get the ns2000 files from hobbes.nmsu.edu (in ns2000.zip). I manually
- +patched protocol.ini to refer to that adaptor, and copied it into my
- +c:\lanman directory. Note that I also modified the driver to be loaded
- +in the config.sys to the ns2000.os2. It might install as an "other"
- +adaptor.
- +
- + A command file "startup.cmd" is placed in c:\. This file is
- +automatically run when OS/2 Warp starts.
- +Here is a copy of my startup file. Note that Warp sometimes fails to
- +login properly to the server. I solve this by checking for the
- +existance of a file, and rerunning the loing if that file fails to
- +exist.
- +
- +@REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN
- +NET START WORKSTATION
- +:relogin
- +NET LOGON maxfield mypassword /y
- +rem net use f: \\packard90\d$
- +rem net use g: \\linuxone\cdromsdir
- +rem net use h: \\linuxone\public
- +:doOver
- +if not exist f:\wildcat\wildcat.exe goto relogin
- +@REM ==== LANMAN 2.2a == DO NOT MODIFY BETWEEN THESE LINES == LANMAN
- +exit
- +
- + Finally, the system expects to be on a domain with a domain
- +server. BTW, TCP/IP and NetBeui allow simultaneous communication with
- +Os/2 lanserver 4.0, and Samba. (Note: Lanserver 4.0 won't yet to
- +TCP/IP. (Well,it might, but it crashes before I get to that point, so I
- +havent' been able to enable it))
- +
- +I have not yet tried with only a SAMBA server on the domain.
- +
- + I would be glad to try to answer any questions at above e-mail
- +address, if I can.
- +
- +wade
- +
- diff -u -r --new-file last-version/docs/WinNT.txt samba-1.9.14alpha9/docs/WinNT.txt
- --- last-version/docs/WinNT.txt Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/docs/WinNT.txt Sun Jul 9 14:37:55 1995
- @@ -0,0 +1,56 @@
- +There are some particular issues with Samba and Windows NT
- +
- +=====================================================================
- +One of the most annoying problems with WinNT is that NT refuses to
- +connect to a server that is in user level security mode and that
- +doesn't support password encryption unless it first prompts the user
- +for a password.
- +
- +This means even if you have the same password on the NT box and the
- +Samba server you will get prompted for a password. Entering the
- +correct password will get you connected.
- +
- +The other major ramification of this feature of NT is that it can't
- +browse a user level non-encrypted server unless it already has a
- +connection open. This is because there is no spot for a password
- +prompt in the browser window. It works fine if you already have a
- +drive mounted (for example, one auto mounted on startup).
- +
- +Samba should support encrypted passwords soon, which will solve this
- +problem.
- +=====================================================================
- +
- +
- +
- +=====================================================================
- +When you mount a printer using the print manager in NT you may find
- +the following info from Matthew Harrell <harrell@leech.nrl.navy.mil>
- +useful:
- +
- +------------
- + I noticed in your change-log you noted that some people were
- +still unable to use print manager under NT. If this is the same problem
- +that I encountered, it's caused by the length of time it takes NT to
- +determine if the printer is ready.
- +
- +The problem occurs when you double-click on a printer to connect it to
- +the NT machine. Because it's unable to determine if the printer is ready
- +in the short span of time it has, it assumes it isn't and gives some
- +strange error about not having enough resources (I forget what the error
- +is). A solution to this that seems to work fine for us is to click
- +once on the printer, look at the bottom of the window and wait until
- +it says it's ready, then clilck on "OK".
- +
- +By the way, this problem probably occurs in our group because the
- +Samba server doesn't actually have the printers - it queues them to
- +remote printers either on other machines or using their own network
- +cards. Because of this "middle layer", it takes an extra amount of
- +time for the NT machine to get verification that the printer queue
- +actually exists.
- +
- +I hope this helped in some way...
- +-----------
- +=====================================================================
- +
- +
- +
- diff -u -r --new-file last-version/source/Makefile samba-1.9.14alpha9/source/Makefile
- --- last-version/source/Makefile Thu Jul 6 17:31:25 1995
- +++ samba-1.9.14alpha9/source/Makefile Sun Jul 9 15:29:01 1995
- @@ -71,8 +71,9 @@
- # AFS_BASE = /usr/afsws
- # AFS_FLAGS = -DAFS_AUTH -I$(AFS_BASE)/include
- # AFS_LIBDIR = $(AFS_BASE)/lib
- +# NOTE: You may need to add -laudit in the line below
- # AFS_LIBS = -L$(AFS_LIBDIR) -L$(AFS_LIBDIR)/afs -lkauth -lprot -lubik \
- -# -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err -laudit \
- +# -lauth -lrxkad -lsys -ldes -lrx -llwp -lcom_err \
- # $(AFS_LIBDIR)/afs/util.a
-
- # This is for DCE/DFS enablement. Uncomment this so that smbd can
- @@ -413,9 +414,9 @@
- INCLUDES = $(INCLUDES1) $(INCLUDES2)
-
- UTILOBJ = util.o charset.o kanji.o fault.o
- -PARAMOBJ = $(UTILOBJ) loadparm.o params.o pcap.o access.o password.o ufc.o
- +PARAMOBJ = $(UTILOBJ) loadparm.o params.o pcap.o access.o username.o ufc.o
- SMBDOBJ1 = $(PARAMOBJ) trans2.o message.o dir.o printing.o locking.o
- -SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o
- +SMBDOBJ2 = ipc.o reply.o mangle.o chgpasswd.o password.o
- SMBDOBJ = $(SMBDOBJ1) $(SMBDOBJ2)
-
- .c.o: $*.c $(INCLUDES)
- diff -u -r --new-file last-version/source/access.c samba-1.9.14alpha9/source/access.c
- --- last-version/source/access.c Fri Jun 30 17:22:49 1995
- +++ samba-1.9.14alpha9/source/access.c Fri Jul 7 15:26:19 1995
- @@ -297,7 +297,7 @@
- BOOL fromhost(int sock,struct from_host *f)
- {
- static struct sockaddr sa;
- - struct sockaddr_in *sin = (struct sockaddr_in *) (&sa);
- + struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa);
- struct hostent *hp;
- int length = sizeof(sa);
- static char addr_buf[FROM_ADDRLEN];
- @@ -310,12 +310,12 @@
- return(False);
- }
-
- - f->sin = sin;
- - f->addr = strcpy(addr_buf,(char *)inet_ntoa(sin->sin_addr));
- + f->sin = sockin;
- + f->addr = strcpy(addr_buf,(char *)inet_ntoa(sockin->sin_addr));
-
- /* Look up the remote host name. */
- - if ((hp = gethostbyaddr((char *) &sin->sin_addr,
- - sizeof(sin->sin_addr),
- + if ((hp = gethostbyaddr((char *) &sockin->sin_addr,
- + sizeof(sockin->sin_addr),
- AF_INET)) == 0) {
- DEBUG(0,("Gethostbyaddr failed\n"));
- #ifdef ALLOW_PURE_ADDRESSES
- @@ -327,14 +327,14 @@
-
- /* Save the host name. A later gethostbyxxx() call may clobber it. */
- f->name = StrnCpy(name_buf,
- - takeAddressAsHostname? f->addr : (char *)hp->h_name,
- + takeAddressAsHostname? f->addr : hp->h_name,
- sizeof(name_buf) - 1);
-
- /*
- * Verify that the host name does not belong to someone else. If host
- * name verification fails, pretend that the host name lookup failed.
- */
- - if (!takeAddressAsHostname && !matchname(f->name, sin->sin_addr))
- + if (!takeAddressAsHostname && !matchname(f->name, sockin->sin_addr))
- {
- DEBUG(0,("Matchname failed\n"));
- return(False);
- diff -u -r --new-file last-version/source/change-log samba-1.9.14alpha9/source/change-log
- --- last-version/source/change-log Thu Jul 6 18:08:50 1995
- +++ samba-1.9.14alpha9/source/change-log Sun Jul 9 16:27:09 1995
- @@ -1508,7 +1508,12 @@
- - convex and other patches from Ulrich Hahn
- <ulrich.hahn@zdv.uni-tuebingen.de>
- - released alpha8
- -
- + - fixed rename directory bug
- + - nmbd wins fix from Maximilian Errath <errath@balu.kfunigraz.ac.at>
- + - client and AFS changes + password.c reorganisation + "more" and
- + "pwd" commands in client from Todd j. Derr (tjd@smi.med.pitt.edu)
- + - fixed several nmbd bugs
- +
-
- ==========
- todo:
- diff -u -r --new-file last-version/source/client.c samba-1.9.14alpha9/source/client.c
- --- last-version/source/client.c Thu Jul 6 17:20:27 1995
- +++ samba-1.9.14alpha9/source/client.c Sun Jul 9 15:26:37 1995
- @@ -384,11 +384,19 @@
- SVAL(inbuf,smb_vwv3)));
- }
-
- +/****************************************************************************
- +show cd/pwd
- +****************************************************************************/
- +static void cmd_pwd(void)
- +{
- + DEBUG(0,("Current directory is %s%s\n",CNV_LANG(service),CNV_LANG(cur_dir)));
- +}
- +
-
- /****************************************************************************
- change directory
- ****************************************************************************/
- -static void cmd_cd(char *inbuf,char *outbuf )
- +static void cmd_cd(char *inbuf,char *outbuf)
- {
- fstring buf;
- char *p = buf;
- @@ -424,8 +432,8 @@
-
-
- /****************************************************************************
- -display info about a file
- -****************************************************************************/
- + display info about a file
- + ****************************************************************************/
- static void display_finfo(file_info *finfo)
- {
- time_t t = finfo->mtime - DSTDiff(finfo->mtime);
- @@ -437,8 +445,8 @@
- }
-
- /****************************************************************************
- -do a directory listing, calling fn on each file found
- -****************************************************************************/
- + do a directory listing, calling fn on each file found
- + ****************************************************************************/
- void do_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(),BOOL recurse_dir)
- {
- if (Protocol >= PROTOCOL_LANMAN2)
- @@ -453,8 +461,8 @@
- }
-
- /*******************************************************************
- -decide if a file should be operated on
- -********************************************************************/
- + decide if a file should be operated on
- + ********************************************************************/
- static BOOL do_this_one(file_info *finfo)
- {
- if (finfo->mode & aDIR) return(True);
- @@ -470,8 +478,8 @@
-
-
- /****************************************************************************
- -act on the files in a dir listing
- -****************************************************************************/
- + act on the files in a dir listing
- + ****************************************************************************/
- static void dir_action(char *inbuf,char *outbuf,int attribute,file_info *finfo,BOOL recurse_dir,void (*fn)(),BOOL longdir)
- {
-
- @@ -514,8 +522,8 @@
-
-
- /****************************************************************************
- -do a directory listing, calling fn on each file found
- -****************************************************************************/
- + do a directory listing, calling fn on each file found
- + ****************************************************************************/
- static int do_short_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(),BOOL recurse_dir)
- {
- char *p;
- @@ -651,10 +659,10 @@
- }
-
- /****************************************************************************
- -receive a SMB trans2 response allocating the necessary memory
- -****************************************************************************/
- + receive a SMB trans2 response allocating the necessary memory
- + ****************************************************************************/
- static BOOL receive_trans2_response(char *inbuf,int *data_len,int *param_len,
- - char **data,char **param)
- + char **data,char **param)
- {
- int total_data=0;
- int total_param=0;
- @@ -696,9 +704,9 @@
- }
-
- /****************************************************************************
- -do a directory listing, calling fn on each file found. Use the TRANSACT2
- -call for long filenames
- -****************************************************************************/
- + do a directory listing, calling fn on each file found. Use the TRANSACT2
- + call for long filenames
- + ****************************************************************************/
- static int do_long_dir(char *inbuf,char *outbuf,char *Mask,int attribute,void (*fn)(),BOOL recurse_dir)
- {
- int max_matches = 512;
- @@ -759,14 +767,14 @@
- SSVAL(outbuf,smb_setup0,TRANSACT2_FINDNEXT);
-
- p = smb_buf(outbuf);
- - *p++ = 0; /* put in a null smb_name */
- - *p++ = 'D'; *p++ = ' '; /* this was added because OS/2 does it */
- + *p++ = 0; /* put in a null smb_name */
- + *p++ = 'D'; *p++ = ' '; /* this was added because OS/2 does it */
-
- if (First)
- {
- SSVAL(p,0,attribute); /* attribute */
- SSVAL(p,2,max_matches); /* max count */
- - SSVAL(p,4,8+4+2); /* resume required + close on end + continue */
- + SSVAL(p,4,8+4+2); /* resume required + close on end + continue */
- SSVAL(p,6,info_level);
- SIVAL(p,8,0);
- p += 12;
- @@ -777,12 +785,12 @@
- else
- {
- DEBUG(5,("hand=0x%X resume=%d ff_lastname=%d mask=%s\n",
- - ff_dir_handle,ff_resume_key,ff_lastname,mask));
- + ff_dir_handle,ff_resume_key,ff_lastname,mask));
- SSVAL(p,0,ff_dir_handle);
- SSVAL(p,2,max_matches); /* max count */
- SSVAL(p,4,info_level);
- SIVAL(p,6,ff_resume_key); /* ff_resume_key */
- - SSVAL(p,10,8+4+2); /* resume required + close on end + continue */
- + SSVAL(p,10,8+4+2); /* resume required + close on end + continue */
- p += 12;
- strcpy(p,mask);
- *p++ = 0; *p++ = 0;
- @@ -850,7 +858,7 @@
- }
-
- /* put in a length for the last entry, to ensure we can chain entries
- - into the next packet */
- + into the next packet */
- {
- char *p2;
- for (p2=p,i=0;i<(ff_searchcount-1);i++)
- @@ -868,7 +876,7 @@
- if (resp_param) free(resp_param); resp_param = NULL;
-
- DEBUG(3,("received %d entries (eos=%d resume=%d)\n",
- - ff_searchcount,ff_eos,ff_resume_key));
- + ff_searchcount,ff_eos,ff_resume_key));
-
- First = False;
- }
- @@ -893,8 +901,8 @@
-
-
- /****************************************************************************
- -get a directory listing
- -****************************************************************************/
- + get a directory listing
- + ****************************************************************************/
- static void cmd_dir(char *inbuf,char *outbuf)
- {
- int attribute = aDIR | aSYSTEM | aHIDDEN;
- @@ -931,8 +939,8 @@
-
-
- /****************************************************************************
- -get a file from rname to lname
- -****************************************************************************/
- + get a file from rname to lname
- + ****************************************************************************/
- static void do_get(char *rname,char *lname,file_info *finfo1)
- {
- int handle=0,fnum;
- @@ -985,7 +993,7 @@
- strcpy(p,rname);
- p = skip_string(p,1);
-
- -/* do a chained openX with a readX? */
- + /* do a chained openX with a readX? */
- #if 1
- if (finfo.size > 0)
- {
- @@ -1001,19 +1009,19 @@
- }
- #endif
-
- - if(!strcmp(lname,"-"))
- - handle = fileno(stdout);
- - else
- - {
- - handle = creat(lname,0644);
- - newhandle = True;
- - }
- - if (handle < 0)
- - {
- - DEBUG(0,("Error opening local file %s\n",lname));
- - free(inbuf);free(outbuf);
- - return;
- - }
- + if(!strcmp(lname,"-"))
- + handle = fileno(stdout);
- + else
- + {
- + handle = creat(lname,0644);
- + newhandle = True;
- + }
- + if (handle < 0)
- + {
- + DEBUG(0,("Error opening local file %s\n",lname));
- + free(inbuf);free(outbuf);
- + return;
- + }
-
- send_smb(outbuf);
- receive_smb(inbuf,CLIENT_TIMEOUT);
- @@ -1061,16 +1069,17 @@
- }
-
-
- - DEBUG(2,("getting file %s of size %d bytes as %s ",
- - CNV_LANG(finfo.name),
- - finfo.size,
- - lname));
- + DEBUG(2,("getting file %s of size %d bytes as %s ",
- + CNV_LANG(finfo.name),
- + finfo.size,
- + lname));
-
- while (nread < finfo.size && !close_done)
- {
- int method = -1;
- - char *p=NULL;
- static BOOL can_chain_close = True;
- +
- + p=NULL;
-
- DEBUG(3,("nread=%d\n",nread));
-
- @@ -1249,11 +1258,11 @@
- break;
- }
-
- - if (writefile(handle,dataptr,datalen) != datalen)
- - {
- - DEBUG(0,("Error writing local file\n"));
- - break;
- - }
- + if (writefile(handle,dataptr,datalen) != datalen)
- + {
- + DEBUG(0,("Error writing local file\n"));
- + break;
- + }
-
- nread += datalen;
- if (datalen == 0)
- @@ -1296,7 +1305,6 @@
- close(handle);
-
- if (archive_level >= 2 && (finfo.mode & aARCH)) {
- - char *p;
- bzero(outbuf,smb_size);
- set_message(outbuf,8,strlen(rname)+4,True);
- CVAL(outbuf,smb_com) = SMBsetatr;
- @@ -1335,8 +1343,8 @@
-
-
- /****************************************************************************
- -get a file
- -****************************************************************************/
- + get a file
- + ****************************************************************************/
- static void cmd_get(void)
- {
- pstring lname;
- @@ -1362,8 +1370,8 @@
-
-
- /****************************************************************************
- -do a mget operation on one file
- -****************************************************************************/
- + do a mget operation on one file
- + ****************************************************************************/
- static void do_mget(file_info *finfo)
- {
- pstring rname;
- @@ -1406,33 +1414,33 @@
- strcat(cur_dir,"\\");
-
- unix_format(finfo->name);
- - {
- - if (lowercase)
- - strlower(finfo->name);
- + {
- + if (lowercase)
- + strlower(finfo->name);
-
- - if (!directory_exist(finfo->name) && mkdir(finfo->name,0777) != 0)
- - {
- - DEBUG(0,("failed to create directory %s\n",CNV_LANG(finfo->name)));
- - strcpy(cur_dir,saved_curdir);
- - free(inbuf);free(outbuf);
- - return;
- - }
- + if (!directory_exist(finfo->name) && mkdir(finfo->name,0777) != 0)
- + {
- + DEBUG(0,("failed to create directory %s\n",CNV_LANG(finfo->name)));
- + strcpy(cur_dir,saved_curdir);
- + free(inbuf);free(outbuf);
- + return;
- + }
-
- - if (chdir(finfo->name) != 0)
- - {
- - DEBUG(0,("failed to chdir to directory %s\n",CNV_LANG(finfo->name)));
- - strcpy(cur_dir,saved_curdir);
- - free(inbuf);free(outbuf);
- - return;
- - }
- - }
- + if (chdir(finfo->name) != 0)
- + {
- + DEBUG(0,("failed to chdir to directory %s\n",CNV_LANG(finfo->name)));
- + strcpy(cur_dir,saved_curdir);
- + free(inbuf);free(outbuf);
- + return;
- + }
- + }
-
- strcpy(mget_mask,cur_dir);
- strcat(mget_mask,"*.*");
-
- do_dir((char *)inbuf,(char *)outbuf,
- mget_mask,aSYSTEM | aHIDDEN | aDIR,do_mget,False);
- - chdir("..");
- + chdir("..");
- strcpy(cur_dir,saved_curdir);
- free(inbuf);free(outbuf);
- }
- @@ -1444,7 +1452,35 @@
- }
- }
-
- +/****************************************************************************
- +view the file using the pager
- +****************************************************************************/
- +static void cmd_more(void)
- +{
- + fstring rname,lname,tmpname,pager_cmd;
- + char *pager;
- +
- + strcpy(rname,cur_dir);
- + strcat(rname,"\\");
- + sprintf(tmpname,"/tmp/smbmore.%d",getpid());
- + strcpy(lname,tmpname);
- +
- + if (!next_token(NULL,rname+strlen(rname),NULL)) {
- + DEBUG(0,("more <filename>\n"));
- + return;
- + }
- + dos_clean_name(rname);
- +
- + do_get(rname,lname,NULL);
- +
- + pager=getenv("PAGER");
- + sprintf(pager_cmd,"%s %s",(pager? pager:PAGER), tmpname);
- + system(pager_cmd);
- + unlink(tmpname);
- +}
- +
-
- +
- /****************************************************************************
- do a mget command
- ****************************************************************************/
- @@ -1532,8 +1568,8 @@
-
-
- /****************************************************************************
- -make a directory
- -****************************************************************************/
- + make a directory
- + ****************************************************************************/
- static void cmd_mkdir(char *inbuf,char *outbuf)
- {
- pstring mask;
- @@ -1576,8 +1612,8 @@
-
-
- /*******************************************************************
- -write to a file using writebraw
- -********************************************************************/
- + write to a file using writebraw
- + ********************************************************************/
- static int smb_writeraw(char *outbuf,int fnum,int pos,char *buf,int n)
- {
- extern int Client;
- @@ -1601,7 +1637,7 @@
- if (!receive_smb(inbuf,CLIENT_TIMEOUT) || CVAL(inbuf,smb_rcls) != 0)
- return(0);
-
- - _smb_setlen(buf-4,n); /* HACK! XXXX */
- + _smb_setlen(buf-4,n); /* HACK! XXXX */
-
- if (write_socket(Client,buf-4,n+4) != n+4)
- return(0);
- @@ -1616,8 +1652,8 @@
-
-
- /*******************************************************************
- -write to a file
- -********************************************************************/
- + write to a file
- + ********************************************************************/
- static int smb_writefile(char *outbuf,int fnum,int pos,char *buf,int n)
- {
- pstring inbuf;
- @@ -1655,8 +1691,8 @@
-
-
- /****************************************************************************
- -put a single file
- -****************************************************************************/
- + put a single file
- + ****************************************************************************/
- static void do_put(char *rname,char *lname,file_info *finfo)
- {
- int fnum;
- @@ -1714,7 +1750,7 @@
- return;
- }
-
- - f = fopen(lname,"r");
- + f = fopen(lname,"r");
-
- if (!f)
- {
- @@ -1776,8 +1812,8 @@
- SIVAL(outbuf,smb_vwv1,close_time);
-
- DEBUG(3,("Setting date to %s (0x%X)",
- - asctime(LocalTime(&finfo->mtime,LOCAL_TO_GMT)),
- - finfo->mtime));
- + asctime(LocalTime(&finfo->mtime,LOCAL_TO_GMT)),
- + finfo->mtime));
-
- send_smb(outbuf);
- receive_smb(inbuf,CLIENT_TIMEOUT);
- @@ -1785,14 +1821,14 @@
- if (CVAL(inbuf,smb_rcls) != 0)
- {
- DEBUG(0,("%s closing remote file %s\n",smb_errstr(inbuf),CNV_LANG(rname)));
- - fclose(f);
- + fclose(f);
- free(inbuf);free(outbuf);
- if (buf) free(buf);
- return;
- }
-
-
- - fclose(f);
- + fclose(f);
- free(inbuf);free(outbuf);
- if (buf) free(buf);
-
- @@ -1816,8 +1852,8 @@
-
-
- /****************************************************************************
- -put a file
- -****************************************************************************/
- + put a file
- + ****************************************************************************/
- static void cmd_put(void)
- {
- pstring lname;
- @@ -1852,9 +1888,9 @@
- }
-
- /****************************************************************************
- -seek in a directory/file list until you get something that doesn't start with
- -the specified name
- -****************************************************************************/
- + seek in a directory/file list until you get something that doesn't start with
- + the specified name
- + ****************************************************************************/
- static BOOL seek_list(FILE *f,char *name)
- {
- pstring s;
- @@ -1874,8 +1910,8 @@
-
-
- /****************************************************************************
- -set the file selection mask
- -****************************************************************************/
- + set the file selection mask
- + ****************************************************************************/
- static void cmd_select(void)
- {
- strcpy(fileselection,"");
- @@ -1884,8 +1920,8 @@
-
-
- /****************************************************************************
- -mput some files
- -****************************************************************************/
- + mput some files
- + ****************************************************************************/
- static void cmd_mput(void)
- {
- pstring lname;
- @@ -1900,17 +1936,17 @@
- while (next_token(NULL,p,NULL))
- {
- pstring cmd;
- - pstring tmpnam;
- + pstring tmpname;
- FILE *f;
-
- - sprintf(tmpnam,"/tmp/ls.smb.%d",(int)getpid());
- + sprintf(tmpname,"/tmp/ls.smb.%d",(int)getpid());
- if (recurse)
- - sprintf(cmd,"find . -name \"%s\" -print > %s",p,tmpnam);
- + sprintf(cmd,"find . -name \"%s\" -print > %s",p,tmpname);
- else
- - sprintf(cmd,"/bin/ls %s > %s",p,tmpnam);
- + sprintf(cmd,"/bin/ls %s > %s",p,tmpname);
- system(cmd);
-
- - f = fopen(tmpnam,"r");
- + f = fopen(tmpname,"r");
- if (!f) continue;
-
- while (!feof(f))
- @@ -1966,13 +2002,13 @@
- do_put(rname,lname,&finfo);
- }
- fclose(f);
- - unlink(tmpnam);
- + unlink(tmpname);
- }
- }
-
- /****************************************************************************
- -cancel a print job
- -****************************************************************************/
- + cancel a print job
- + ****************************************************************************/
- static void do_cancel(int job)
- {
- char *p,*rparam,*rdata;
- @@ -1982,13 +2018,13 @@
- bzero(param,sizeof(param));
-
- p = param;
- - SSVAL(p,0,81); /* api number */
- + SSVAL(p,0,81); /* api number */
- p += 2;
- strcpy(p,"W");
- p = skip_string(p,1);
- strcpy(p,"");
- p = skip_string(p,1);
- - SSVAL(p,0,0); /* level 0 */
- + SSVAL(p,0,0); /* level 0 */
- p += 2;
-
- if (call_api(PTR_DIFF(p,param),0,
- @@ -2012,8 +2048,8 @@
-
-
- /****************************************************************************
- -cancel a print job
- -****************************************************************************/
- + cancel a print job
- + ****************************************************************************/
- static void cmd_cancel(char *inbuf,char *outbuf )
- {
- fstring buf;
- @@ -2037,8 +2073,8 @@
-
-
- /****************************************************************************
- -print a file
- -****************************************************************************/
- + print a file
- + ****************************************************************************/
- static void cmd_print(char *inbuf,char *outbuf )
- {
- int fnum;
- @@ -2614,7 +2650,6 @@
- /* setup the protocol strings */
- {
- int plength;
- - char *p;
-
- for (plength=0,numprots=0;
- prots[numprots].name && prots[numprots].prot<=max_protocol;
- @@ -2790,8 +2825,8 @@
- }
-
- if (Protocol >= PROTOCOL_NT1) {
- - char *p = smb_buf(inbuf);
- char *domain,*os,*lanman;
- + p = smb_buf(inbuf);
- os = p;
- lanman = skip_string(os,1);
- domain = skip_string(lanman,1);
- @@ -3181,10 +3216,12 @@
- {"dir",cmd_dir,"<mask> list the contents of the current directory"},
- {"lcd",cmd_lcd,"[directory] change/report the local current working directory"},
- {"cd",cmd_cd,"[directory] change/report the remote directory"},
- + {"pwd",cmd_pwd,"show current remote directory (same as 'cd' with no args)"},
- {"get",cmd_get,"<remote name> [local name] get a file"},
- {"mget",cmd_mget,"<mask> get all the matching files"},
- {"put",cmd_put,"<local name> [remote name] put a file"},
- {"mput",cmd_mput,"<mask> put all matching files"},
- + {"more",cmd_more,"<remote name> view a remote file with your pager"},
- {"mask",cmd_select,"<mask> mask all filenames against this"},
- {"del",cmd_del,"<mask> delete all matching files"},
- {"rm",cmd_del,"<mask> delete all matching files"},
- diff -u -r --new-file last-version/source/clitar.c samba-1.9.14alpha9/source/clitar.c
- --- last-version/source/clitar.c Thu Jul 6 17:37:58 1995
- +++ samba-1.9.14alpha9/source/clitar.c Fri Jul 7 15:13:34 1995
- @@ -201,14 +201,14 @@
- if (tp > 0) write(f, tarbuf, S_ISREG(stbuf.st_mode) ? tp : tbufsiz);
- }
-
- -static void fixtarname(char *tp, char *fp, int l)
- +static void fixtarname(char *tptr, char *fp, int l)
- {
- /* add a '.' to start of file name, convert from ugly dos \'s in path
- * to lovely unix /'s :-} */
-
- - *tp++='.';
- + *tptr++='.';
-
- - while (l--) { *tp=(*fp == '\\') ? '/' : *fp; tp++; fp++; }
- + while (l--) { *tptr=(*fp == '\\') ? '/' : *fp; tptr++; fp++; }
- }
-
- static void oct_it (register long value, register int ndgs, register char *p)
- @@ -459,8 +459,9 @@
- while (nread < finfo.size && !close_done)
- {
- int method = -1;
- - char *p=NULL;
- static BOOL can_chain_close=True;
- +
- + p=NULL;
-
- DEBUG(3,("nread=%d\n",nread));
-
- @@ -836,7 +837,7 @@
- return True;
- }
-
- -static void unfixtarname(char *tp, char *fp, int l)
- +static void unfixtarname(char *tptr, char *fp, int l)
- {
- /* remove '.' from start of file name, convert from unix /'s to
- * dos \'s in path. Kill any absolute path names.
- @@ -845,7 +846,7 @@
- if (*fp == '.') fp++;
- if (*fp == '\\' || *fp == '/') fp++;
-
- - while (l--) { *tp=(*fp == '/') ? '\\' : *fp; tp++; fp++; }
- + while (l--) { *tptr=(*fp == '/') ? '\\' : *fp; tptr++; fp++; }
- }
-
- static long unoct(char *p, int ndgs)
- diff -u -r --new-file last-version/source/fault.c samba-1.9.14alpha9/source/fault.c
- --- last-version/source/fault.c Thu Jun 29 18:18:03 1995
- +++ samba-1.9.14alpha9/source/fault.c Thu Jul 6 22:29:44 1995
- @@ -52,11 +52,7 @@
- DEBUG(0,("===============================================================\n"));
-
- #if AJT
- -/* this is for my own private use - it should not normally be defined */
- - {
- - pstring cmd = "/usr/bin/X11/xedit -display :0 /tmp/ERROR_FAULT &";
- - smbrun(cmd,NULL);
- - }
- + ajt_panic();
- #endif
-
- if (cont_fn)
- diff -u -r --new-file last-version/source/ipc.c samba-1.9.14alpha9/source/ipc.c
- --- last-version/source/ipc.c Thu Jul 6 14:42:19 1995
- +++ samba-1.9.14alpha9/source/ipc.c Thu Jul 6 22:39:07 1995
- @@ -23,7 +23,6 @@
- in the SMBtrans protocol
- */
-
- -
- #include "includes.h"
- #include "loadparm.h"
- #include "pcap.h"
- @@ -296,9 +295,12 @@
- #if CHECK_TYPES
- str = va_arg(args,char*);
- if (strncmp(str,p->curpos,strlen(str)) != 0) {
- - DEBUG(2,("type error in package: %s instead of %*s in %s/%s\n",str,
- - strlen(str),p->curpos,p->format1,p->format2));
- + DEBUG(2,("type error in package: %s instead of %*s\n",str,
- + strlen(str),p->curpos));
- va_end(args);
- +#if AJT
- + ajt_panic();
- +#endif
- return 0;
- }
- #endif
- @@ -374,8 +376,8 @@
- }
-
- #if CHECK_TYPES
- -#define PACK(desc,t,v) package(desc,t,v)
- -#define PACKl(desc,t,v,l) package(desc,t,v,l)
- +#define PACK(desc,t,v) package(desc,t,v,0,0,0,0)
- +#define PACKl(desc,t,v,l) package(desc,t,v,l,0,0,0,0)
- #else
- #define PACK(desc,t,v) package(desc,v)
- #define PACKl(desc,t,v,l) package(desc,v,l)
- diff -u -r --new-file last-version/source/local.h samba-1.9.14alpha9/source/local.h
- --- last-version/source/local.h Thu Jul 6 13:50:28 1995
- +++ samba-1.9.14alpha9/source/local.h Sun Jul 9 15:12:58 1995
- @@ -67,7 +67,9 @@
-
- /* shall filenames with illegal chars in them get mangled in long
- filename listings? */
- -#define MANGLE_LONG_FILENAMES
- +#if !AJT
- +#define MANGLE_LONG_FILENAMES
- +#endif
-
- /* define this if you want to stop spoofing with .. and soft links
- NOTE: This also slows down the server considerably */
- @@ -97,6 +99,11 @@
- #define GUEST_SESSSETUP 0
- #endif
-
- +/* the default pager to use for the client "more" command. Users can
- + override this with the PAGER environment variable */
- +#ifndef PAGER
- +#define PAGER "more"
- +#endif
-
- /* the following control timings of various actions. Don't change
- them unless you know what you are doing. These are all in seconds */
- diff -u -r --new-file last-version/source/nameserv.c samba-1.9.14alpha9/source/nameserv.c
- --- last-version/source/nameserv.c Thu Jul 6 17:51:39 1995
- +++ samba-1.9.14alpha9/source/nameserv.c Sun Jul 9 16:24:33 1995
- @@ -44,6 +44,8 @@
- static pstring lookup="";
- static int Client138=-1;
-
- +enum name_sources {LMHOSTS, REGISTER, SELF, DNS};
- +
- /* this is the structure used for the local netbios name table */
- typedef struct
- {
- @@ -57,7 +59,8 @@
- BOOL unicast;
- char name[100];
- int type;
- - int count;
- + int count;
- + enum name_sources source;
- } name_struct;
-
-
- @@ -262,14 +265,14 @@
- /****************************************************************************
- load a netbios hosts file
- ****************************************************************************/
- -static void load_hosts_file(char *name)
- +static void load_hosts_file(char *fname)
- {
- int i;
- - FILE *f = fopen(name,"r");
- + FILE *f = fopen(fname,"r");
- pstring line;
- if (!f)
- {
- - DEBUG(2,("Not using non-existant lmhosts file %s\n",name));
- + DEBUG(2,("Not using non-existant lmhosts file %s\n",fname));
- return;
- }
-
- @@ -309,6 +312,7 @@
- putip((char *)&names[i].ip,(char *)&a);
-
- names[i].valid = True;
- + names[i].source = LMHOSTS;
-
- StrnCpy(names[i].name,name,15);
- if (strchr(flags,'G') || strchr(flags,'S'))
- @@ -343,6 +347,7 @@
- names[i].isgroup = True;
- names[i].valid = True;
- names[i].type = 0xF0;
- + names[i].source = SELF;
- }
-
- /****************************************************************************
- @@ -364,6 +369,7 @@
- names[i].start_time = time(NULL);
- names[i].ttl = 0;
- names[i].type = type;
- + names[i].source = SELF;
- }
-
- /****************************************************************************
- @@ -491,10 +497,10 @@
- {
- int level = master?3:0;
- char *p = inbuf + 12 + name_len(inbuf+12) + 10;
- - int num_names = CVAL(p,0);
- - DEBUG(level,("received %d names\n",num_names));
- + int numnames = CVAL(p,0);
- + DEBUG(level,("received %d names\n",numnames));
- p += 1;
- - while (num_names--)
- + while (numnames--)
- {
- char qname[17];
- int type;
- @@ -855,28 +861,27 @@
- ttl = MIN(ttl,NMBD_MAX_TTL);
-
- n = find_name(qname,name_type,True);
- - if (names[n].isgroup) return;
-
- - if (n < 0) {
- - if ((n=add_name())>=0) {
- - StrnCpy(names[n].name,qname,15);
- - names[n].type = name_type;
- - names[n].unicast = !dns_serve || is_mynet(ip);
- - names[n].ip = ip;
- - names[n].valid = True;
- - names[n].ttl = ttl;
- - names[n].start_time = time(NULL);
- - DEBUG(2,("Added %s with ttl %d as (%s) (uni=%s)\n",
- - qname,names[n].ttl,inet_ntoa(ip),BOOLSTR(names[n].unicast)));
- - }
- - }
- -
- - if (n>=0 && names[n].ttl>0 && !memcmp(&names[n].ip,&ip,sizeof(ip))) {
- - names[n].ip = ip;
- - names[n].ttl = ttl;
- - names[n].start_time = time(NULL);
- - }
- - }
- + if (n>=0 && names[n].source != REGISTER && names[n].source != DNS)
- + return;
- +
- + if (n<0)
- + n = add_name();
- + if (n<0) return;
- +
- + bzero(&names[n],sizeof(names[n]));
- +
- + StrnCpy(names[n].name,qname,15);
- + names[n].type = name_type;
- + names[n].unicast = !dns_serve || is_mynet(ip);
- + names[n].ip = ip;
- + names[n].valid = True;
- + names[n].ttl = ttl;
- + names[n].source = REGISTER;
- + names[n].start_time = time(NULL);
- + DEBUG(2,("Added %s with ttl %d as (%s) (uni=%s)\n",
- + qname,names[n].ttl,inet_ntoa(ip),BOOLSTR(names[n].unicast)));
- + }
-
- if (bcast) return;
-
- @@ -949,17 +954,13 @@
- DEBUG(2,("Name release request for %s (%s) nb_flags=0x%x ntype=%d\n",
- qname,inet_ntoa(ip),nb_flags,name_type));
-
- -
- n = find_name(qname,name_type,True);
- - if (n>=0 &&
- - !names[n].isgroup &&
- - memcmp(&names[n].ip,&ip,sizeof(ip))==0 &&
- - names[n].ttl != 0) {
- + if (n>=0 && names[n].source == REGISTER &&
- + !memcmp((char *)&ip,(char *)&names[n].ip,sizeof(ip))) {
- release_ok = True;
- names[n].valid = False;
- }
-
- -
- /* Send a POSITIVE NAME RELEASE RESPONSE */
- RSSVAL(outbuf,0,rec_name_trn_id);
- CVAL(outbuf,2) = (1<<7) | (6<<3) | 4;
- @@ -1019,6 +1020,8 @@
-
- if (i < 0)
- return;
- + if (names[i].source != SELF && names[i].source != LMHOSTS)
- + return;
- }
-
- /* Send a POSITIVE NAME STATUS RESPONSE */
- @@ -1120,18 +1123,18 @@
- if (i < 0)
- i = find_name(qname,name_type,True);
-
- - if (i >= 0 && names[i].unicast && broadcast) {
- - DEBUG(2,(" - broadcast. No reply\n"));
- - return;
- - }
- -
- if (i >= 0)
- {
- + if (broadcast && (names[i].unicast || names[i].source == REGISTER)) {
- + DEBUG(2,(" - broadcast. No reply\n"));
- + return;
- + }
- +
- if (ISGROUP(i)) {
- DEBUG(2,(" - group name. No reply\n"));
- return;
- }
- -
- +
- retip = names[i].ip;
- DEBUG(2,(" sending positive reply\n"));
- }
- @@ -1167,24 +1170,22 @@
- DEBUG(2,(" on same subnet (%s), no reply\n",inet_ntoa(retip)));
- return;
- }
- + i = find_name(qname,name_type,True);
- + if (i < 0) {
- + if ((i=add_name())>=0) {
- + StrnCpy(names[i].name,qname,15);
- + names[i].type = name_type;
- + names[i].unicast = is_mynet(retip);
- + names[i].ip = retip;
- + names[i].valid = True;
- + names[i].ttl = 120; /* give it two minutes */
- + names[i].start_time = time(NULL);
- + names[i].source = DNS;
- + }
- + }
- }
- DEBUG(2,(" sending positive reply (%s)\n",inet_ntoa(retip)));
- }
- -
- -#if 1
- - i = find_name(qname,name_type,True);
- - if (i < 0) {
- - if ((i=add_name())>=0) {
- - StrnCpy(names[i].name,qname,15);
- - names[i].type = name_type;
- - names[i].unicast = is_mynet(retip);
- - names[i].ip = retip;
- - names[i].valid = True;
- - names[i].ttl = 120; /* give it two minutes */
- - names[i].start_time = time(NULL);
- - }
- - }
- -#endif
- } else {
- retip = myip;
- }
- @@ -1335,7 +1336,7 @@
- /****************************************************************************
- construct a host announcement unicast
- ****************************************************************************/
- -static void announce_host(int i,char *myname,char *comment)
- +static void announce_host(int i,char *my_name,char *Comment)
- {
- static int announce_interval = 1;
- char *group = names[i].name;
- @@ -1352,11 +1353,11 @@
- DEBUG(2,("Sending host announcement to %s for group %s\n",
- inet_ntoa(dest_ip),group));
-
- - if (!*comment) comment = "NoComment";
- - if (!*myname) myname = "NoName";
- + if (!*Comment) Comment = "NoComment";
- + if (!*my_name) my_name = "NoName";
- if (!*group) group = "NoGroup";
-
- - if (strlen(comment) > 47) comment[47] = 0;
- + if (strlen(Comment) > 47) Comment[47] = 0;
-
- bzero(outbuf,sizeof(outbuf));
- p = outbuf;
- @@ -1365,7 +1366,7 @@
- CVAL(p,3) = 0xEA; /* res1 */
- SSVAL(p,4,announce_interval);
- p += 6;
- - StrnCpy(p,myname,16);
- + StrnCpy(p,my_name,16);
- strupper(p);
- p += 16;
- CVAL(p,0) = 1; /* major version (was 1) */
- @@ -1374,10 +1375,10 @@
- SSVAL(p,6,0x30B); /* election version */
- SSVAL(p,8,0xAA55); /* browse constant */
- p += 10;
- - strcpy(p,comment);
- + strcpy(p,Comment);
- p += strlen(p)+1;
-
- - send_udp_138(outbuf,PTR_DIFF(p,outbuf),myname,group,0,0x1d,dest_ip);
- + send_udp_138(outbuf,PTR_DIFF(p,outbuf),my_name,group,0,0x1d,dest_ip);
- }
-
-
- @@ -1568,7 +1569,7 @@
- struct in_addr ip2;
- announce_host(i,myname,comment);
-
- - if (!name_query(names[i].name,0x1d,False,
- + if (!name_query(names[i].name,0x1d,True,
- names[i].master_ip,
- &ip2,construct_reply)) {
- DEBUG(2,("%s Master browser at %s failed to respond\n",
- @@ -1678,7 +1679,7 @@
- /****************************************************************************
- open the socket communication
- ****************************************************************************/
- -static BOOL open_sockets(BOOL is_daemon,int port)
- +static BOOL open_sockets(BOOL isdaemon,int port)
- {
- struct hostent *hp;
-
- @@ -1689,7 +1690,7 @@
- return False;
- }
-
- - if (is_daemon)
- + if (isdaemon)
- Client = open_socket_in(SOCK_DGRAM, port,*lookup?3:0);
- else
- Client = 0;
- diff -u -r --new-file last-version/source/password.c samba-1.9.14alpha9/source/password.c
- --- last-version/source/password.c Thu Jul 6 17:46:42 1995
- +++ samba-1.9.14alpha9/source/password.c Sun Jul 9 15:07:48 1995
- @@ -570,53 +570,7 @@
- }
-
-
- -/****************************************************************************
- -check if a user is in a user list
- -****************************************************************************/
- -BOOL user_in_list(char *user,char *list)
- -{
- - pstring list2;
- - char *p;
- -
- - strcpy(list2,list);
- -
- - for (p = strtok(list2,LIST_SEP); p; p = strtok(NULL,LIST_SEP))
- - {
- - if (strequal(user,p))
- - return(True);
- -#if HAVE_GETGRNAM
- - if (*p == '@')
- - {
- - struct group *gptr;
- - char **member;
- - struct passwd *pass = Get_Pwnam(user,False);
- -
- - if (pass) {
- - gptr = getgrgid(pass->pw_gid);
- - if (gptr && strequal(gptr->gr_name,p+1))
- - return(True);
- - }
- -
- - gptr = (struct group *)getgrnam(p+1);
-
- - if (gptr)
- - {
- - member = gptr->gr_mem;
- - while (member && *member)
- - {
- - if (strequal(*member,user))
- - return(True);
- - member++;
- - }
- - }
- - }
- -#endif
- - }
- - return(False);
- -}
- -
- -
- -
- /****************************************************************************
- check if a username is valid
- ****************************************************************************/
- @@ -1156,169 +1110,6 @@
- #endif
-
- return(True);
- -}
- -
- -/****************************************************************************
- -get a users home directory. tries as-is then lower case
- -****************************************************************************/
- -char *get_home_dir(char *user)
- -{
- - static struct passwd *pass;
- -
- - pass = Get_Pwnam(user,False);
- -
- - if (!pass) return(NULL);
- - return(pass->pw_dir);
- -}
- -
- -
- -/*******************************************************************
- -map a username from a dos name to a unix name by looking in the username
- -map
- -********************************************************************/
- -void map_username(char *user)
- -{
- - static int depth=0;
- - static BOOL initialised=False;
- - static fstring last_from,last_to;
- - FILE *f;
- - char *s;
- - char *mapfile = lp_username_map();
- - if (!*mapfile || depth) return;
- -
- - if (!*user) return;
- -
- - if (!initialised) {
- - *last_from = *last_to = 0;
- - initialised = True;
- - }
- -
- - if (strequal(user,last_to)) return;
- -
- - if (strequal(user,last_from)) {
- - DEBUG(3,("Mapped user %s to %s\n",user,last_to));
- - strcpy(user,last_to);
- - return;
- - }
- -
- - f = fopen(mapfile,"r");
- - if (!f) {
- - DEBUG(0,("can't open username map %s\n",mapfile));
- - return;
- - }
- -
- - DEBUG(4,("Scanning username map %s\n",mapfile));
- -
- - depth++;
- -
- - for (; (s=fgets_slash(NULL,80,f)); free(s)) {
- - char *unixname = s;
- - char *dosname = strchr(unixname,'=');
- -
- - if (!dosname) continue;
- - *dosname++ = 0;
- -
- - while (isspace(*unixname)) unixname++;
- - if (!*unixname || strchr("#;",*unixname)) continue;
- -
- - {
- - int l = strlen(unixname);
- - while (l && isspace(unixname[l-1])) {
- - unixname[l-1] = 0;
- - l--;
- - }
- - }
- -
- - if (strchr(dosname,'*') || user_in_list(user,dosname)) {
- - DEBUG(3,("Mapped user %s to %s\n",user,unixname));
- - StrnCpy(last_from,user,sizeof(last_from)-1);
- - sscanf(unixname,"%s",user);
- - StrnCpy(last_to,user,sizeof(last_to)-1);
- - }
- - }
- -
- - fclose(f);
- -
- - depth--;
- -}
- -
- -/****************************************************************************
- -internals of Get_Pwnam wrapper
- -****************************************************************************/
- -static struct passwd *_Get_Pwnam(char *s)
- -{
- - struct passwd *ret;
- -
- - ret = getpwnam(s);
- - if (ret)
- - {
- -#ifdef GETPWANAM
- - struct passwd_adjunct *pwret;
- - pwret = getpwanam(s);
- - if (pwret)
- - {
- - free(ret->pw_passwd);
- - ret->pw_passwd = pwret->pwa_passwd;
- - }
- -#endif
- -
- -#if defined(NEXT)&&defined(i386)
- - /* Workaround for NS 3.2 posix bug in getpwnam() */
- - if (!ret->pw_uid && ret->pw_short_pad1)
- - ret->pw_uid = ret->pw_short_pad1;
- - if (!ret->pw_gid && ret->pw_short_pad2)
- - ret->pw_gid = ret->pw_short_pad2;
- -#endif
- -
- - }
- -
- - return(ret);
- -}
- -
- -
- -/****************************************************************************
- -a wrapper for getpwnam() that tries with all lower and all upper case
- -if the initial name fails. Also tried with first letter capitalised
- -Note that this changes user!
- -****************************************************************************/
- -struct passwd *Get_Pwnam(char *user,BOOL allow_change)
- -{
- - fstring user2;
- -
- - struct passwd *ret;
- -
- - if (!user || !(*user))
- - return(NULL);
- -
- - StrnCpy(user2,user,sizeof(user2)-1);
- -
- - if (!allow_change) {
- - user = &user2[0];
- - }
- -
- - map_username(user);
- -
- - ret = _Get_Pwnam(user);
- - if (ret) return(ret);
- -
- - strlower(user);
- - ret = _Get_Pwnam(user);
- - if (ret) return(ret);
- -
- - strupper(user);
- - ret = _Get_Pwnam(user);
- - if (ret) return(ret);
- -
- - /* try with first letter capitalised */
- - if (strlen(user) > 1)
- - strlower(user+1);
- - ret = _Get_Pwnam(user);
- - if (ret) return(ret);
- -
- - if (allow_change)
- - strcpy(user,user2);
- -
- - return(NULL);
- }
-
-
- diff -u -r --new-file last-version/source/reply.c samba-1.9.14alpha9/source/reply.c
- --- last-version/source/reply.c Wed Jul 5 17:30:13 1995
- +++ samba-1.9.14alpha9/source/reply.c Fri Jul 7 15:09:51 1995
- @@ -682,7 +682,6 @@
- }
-
- {
- - char *p;
- for (p=mask; *p; p++)
- {
- if (*p != '?' && *p != '*' && !isdoschar(*p))
- @@ -706,7 +705,7 @@
-
- if (can_open)
- {
- - char *p = smb_buf(outbuf) + 3;
- + p = smb_buf(outbuf) + 3;
-
- ok = True;
-
- @@ -1136,7 +1135,6 @@
- return(True);
- }
-
- -
- /****************************************************************************
- reply to a unlink
- ****************************************************************************/
- @@ -2401,6 +2399,20 @@
- return(True);
- }
-
- +/*******************************************************************
- +check if a user is allowed to rename a file
- +********************************************************************/
- +static BOOL can_rename(char *fname,int cnum)
- +{
- + struct stat sbuf;
- + int fmode;
- +
- + if (lstat(fname,&sbuf) != 0) return(False);
- + fmode = dos_mode(cnum,fname,&sbuf);
- + if (fmode & aRONLY) return(False);
- + return(True);
- +}
- +
- /****************************************************************************
- reply to a mv
- ****************************************************************************/
- @@ -2409,7 +2421,6 @@
- int outsize = 0;
- pstring name;
- int cnum;
- - int dirtype=0;
- pstring directory;
- pstring mask,newname;
- char *p;
- @@ -2448,7 +2459,7 @@
- strcat(directory,"/");
- strcat(directory,mask);
- if (resolve_wildcards(directory,newname) &&
- - can_delete(directory,cnum,dirtype) &&
- + can_rename(directory,cnum) &&
- !rename(directory,newname)) count++;
- } else {
- void *dirptr = NULL;
- @@ -2474,7 +2485,7 @@
-
- error = ERRnoaccess;
- sprintf(fname,"%s/%s",directory,dname);
- - if (!can_delete(fname,cnum,dirtype)) continue;
- + if (!can_rename(fname,cnum)) continue;
- strcpy(destname,newname);
- if (resolve_wildcards(fname,destname) &&
- !rename(fname,destname)) count++;
- diff -u -r --new-file last-version/source/server.c samba-1.9.14alpha9/source/server.c
- --- last-version/source/server.c Thu Jul 6 17:54:31 1995
- +++ samba-1.9.14alpha9/source/server.c Fri Jul 7 15:03:30 1995
- @@ -815,7 +815,7 @@
- /****************************************************************************
- open a file with a share mode
- ****************************************************************************/
- -void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,int mode,int *access,int *action)
- +void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,int mode,int *Access,int *action)
- {
- int flags=0;
- int flags2=0;
- @@ -851,18 +851,18 @@
- case 1:
- open_mode2 = 1;
- flags = O_WRONLY;
- - *access = 1;
- + *Access = 1;
- break;
- case 2:
- case 0xF: /* XXXX - need to handle FCB open */
- open_mode2 = 2;
- flags = O_RDWR;
- - *access = 2;
- + *Access = 2;
- break;
- default:
- open_mode2 = 0;
- flags = O_RDONLY;
- - *access = 0;
- + *Access = 0;
- break;
- }
- open_mode = open_mode2;
- @@ -881,14 +881,14 @@
- return;
- }
- flags = O_RDONLY;
- - *access = 0;
- + *Access = 0;
- open_mode = 0;
- }
-
- open_file(fnum,cnum,fname,flags|flags2,mode);
- if (!Files[fnum].open && flags==O_RDWR && errno!=ENOENT) {
- flags = O_RDONLY;
- - *access = 0;
- + *Access = 0;
- open_mode = 0;
- open_file(fnum,cnum,fname,flags,mode);
- if (Files[fnum].open)
- @@ -965,7 +965,7 @@
- open_mode = 0;
- share_mode = (deny_mode<<4) | open_mode;
- DEBUG(2,("Share retry on file %s\n",fname));
- - open_file_shared(fnum,cnum,fname,share_mode,ofun,mode,access,action);
- + open_file_shared(fnum,cnum,fname,share_mode,ofun,mode,Access,action);
- return;
- }
-
- @@ -974,7 +974,7 @@
- open_mode = 1;
- share_mode = (deny_mode<<4) | open_mode;
- DEBUG(2,("Share retry 2 on file %s\n",fname));
- - open_file_shared(fnum,cnum,fname,share_mode,ofun,mode,access,action);
- + open_file_shared(fnum,cnum,fname,share_mode,ofun,mode,Access,action);
- return;
- }
-
- @@ -1965,13 +1965,13 @@
-
- if (*lp_force_user(snum))
- {
- - struct passwd *pass;
- + struct passwd *pass2;
- fstring fuser;
- strcpy(fuser,lp_force_user(snum));
- - pass = (struct passwd *)Get_Pwnam(fuser,True);
- - if (pass)
- + pass2 = (struct passwd *)Get_Pwnam(fuser,True);
- + if (pass2)
- {
- - Connections[cnum].uid = pass->pw_uid;
- + Connections[cnum].uid = pass2->pw_uid;
- string_set(&Connections[cnum].user,fuser);
- strcpy(user,fuser);
- DEBUG(3,("Forced user %s\n",fuser));
- @@ -1995,7 +1995,7 @@
- if (!IS_IPC(cnum))
- {
-
- - if (-1 == initgroups(pass->pw_name,Connections[cnum].gid))
- + if (-1 == initgroups(Connections[cnum].user,Connections[cnum].gid))
- {
- if (getuid() == 0)
- {
- @@ -2003,7 +2003,7 @@
- if (Connections[cnum].gid < 0 || Connections[cnum].gid > 16000 ||
- Connections[cnum].uid < 0 || Connections[cnum].uid > 16000)
- DEBUG(0,("This is probably a problem with the account %s\n",
- - pass->pw_name));
- + Connections[cnum].user));
- }
- }
- else
- @@ -2050,7 +2050,7 @@
- Connections[cnum].groups = groups;
- }
- }
- - DEBUG(3,("%s is in %d groups\n",pass->pw_name,ngroups));
- + DEBUG(3,("%s is in %d groups\n",Connections[cnum].user,ngroups));
- for (i=0;i<ngroups;i++)
- DEBUG(3,("%d ",igroups[i]));
- DEBUG(3,("\n"));
- @@ -2337,14 +2337,14 @@
- {
- extern fstring remote_arch;
- int outsize = set_message(outbuf,1,0,True);
- - int index;
- + int Index;
- int choice=-1;
- int protocol;
- char *p;
- int bcc = SVAL(smb_buf(inbuf),-2);
-
- /* look through the protocol list */
- - index = 0;
- + Index = 0;
- p = smb_buf(inbuf)+1;
- while (p < (smb_buf(inbuf) + bcc))
- {
- @@ -2366,7 +2366,7 @@
- }
-
- p += strlen(p) + 2;
- - index++;
- + Index++;
- }
-
-
- @@ -2374,7 +2374,7 @@
- reload_services(True);
-
- /* a special case to stop password server loops */
- - if (index == 1 && strequal(remote_machine,myhostname) &&
- + if (Index == 1 && strequal(remote_machine,myhostname) &&
- lp_security()==SEC_SERVER)
- exit_server("Password server loop!");
-
- @@ -2385,13 +2385,13 @@
- for (protocol = 0; supported_protocols[protocol].proto_name; protocol++)
- {
- p = smb_buf(inbuf)+1;
- - index = 0;
- + Index = 0;
- if (lp_maxprotocol() >= supported_protocols[protocol].protocol_level)
- while (p < (smb_buf(inbuf) + bcc))
- {
- if (strequal(p,supported_protocols[protocol].proto_name))
- - choice = index;
- - index++;
- + choice = Index;
- + Index++;
- p += strlen(p) + 2;
- }
- if(choice != -1)
- diff -u -r --new-file last-version/source/smb.h samba-1.9.14alpha9/source/smb.h
- --- last-version/source/smb.h Thu Jul 6 17:51:56 1995
- +++ samba-1.9.14alpha9/source/smb.h Fri Jul 7 14:59:25 1995
- @@ -641,7 +641,7 @@
- void *dptr_fetch_lanman2(char *params,int dptr_num);
- BOOL get_dir_entry(int cnum,char *mask,int dirtype,char *fname,int *size,int *mode,time_t *date,BOOL check_descend);
- void open_file(int fnum,int cnum,char *fname,int flags,int mode);
- -void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,int mode,int *access,int *action);
- +void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,int mode,int *Access,int *action);
- void close_file(int fnum);
- int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize);
- int reply_trans(char *inbuf,char *outbuf);
- @@ -777,6 +777,9 @@
- unsigned long interpret_addr(char *str);
- void mangle_name_83(char *s, char *MangledMap);
- BOOL lp_casesignames(void);
- +#if AJT
- +void ajt_panic(void);
- +#endif
- #ifdef NOSTRDUP
- char *strdup(char *s);
- #endif
- diff -u -r --new-file last-version/source/trans2.c samba-1.9.14alpha9/source/trans2.c
- --- last-version/source/trans2.c Thu Jul 6 13:57:15 1995
- +++ samba-1.9.14alpha9/source/trans2.c Fri Jul 7 15:09:17 1995
- @@ -168,7 +168,7 @@
- int16 open_ofun = SVAL(params,12);
- int32 open_size = IVAL(params,14);
- char *pname = ¶ms[28];
- - int16 name_len = strlen(pname)+1;
- + int16 namelen = strlen(pname)+1;
-
- pstring fname;
- int fnum = -1;
- @@ -178,7 +178,7 @@
- struct stat sbuf;
- int smb_action = 0;
-
- - StrnCpy(fname,pname,name_len);
- + StrnCpy(fname,pname,namelen);
-
- DEBUG(3,("trans2open %s cnum=%d mode=%d attr=%d ofun=%d size=%d\n",
- fname,cnum,open_mode, open_attr, open_ofun, open_size));
- @@ -601,7 +601,7 @@
-
- /* convert the formatted masks */
- {
- - char *p = mask;
- + p = mask;
- while (*p) {
- if (*p == '<') *p = '*';
- if (*p == '>') *p = '?';
- diff -u -r --new-file last-version/source/username.c samba-1.9.14alpha9/source/username.c
- --- last-version/source/username.c Thu Jan 1 10:00:00 1970
- +++ samba-1.9.14alpha9/source/username.c Sun Jul 9 15:07:08 1995
- @@ -0,0 +1,236 @@
- +/*
- + Unix SMB/Netbios implementation.
- + Version 1.9.
- + Username handling
- + Copyright (C) Andrew Tridgell 1992-1995
- +
- + This program is free software; you can redistribute it and/or modify
- + it under the terms of the GNU General Public License as published by
- + the Free Software Foundation; either version 2 of the License, or
- + (at your option) any later version.
- +
- + This program is distributed in the hope that it will be useful,
- + but WITHOUT ANY WARRANTY; without even the implied warranty of
- + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- + GNU General Public License for more details.
- +
- + You should have received a copy of the GNU General Public License
- + along with this program; if not, write to the Free Software
- + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- +*/
- +
- +#include "includes.h"
- +#include "loadparm.h"
- +extern int DEBUGLEVEL;
- +
- +
- +/****************************************************************************
- +get a users home directory. tries as-is then lower case
- +****************************************************************************/
- +char *get_home_dir(char *user)
- +{
- + static struct passwd *pass;
- +
- + pass = Get_Pwnam(user,False);
- +
- + if (!pass) return(NULL);
- + return(pass->pw_dir);
- +}
- +
- +
- +/*******************************************************************
- +map a username from a dos name to a unix name by looking in the username
- +map
- +********************************************************************/
- +void map_username(char *user)
- +{
- + static int depth=0;
- + static BOOL initialised=False;
- + static fstring last_from,last_to;
- + FILE *f;
- + char *s;
- + char *mapfile = lp_username_map();
- + if (!*mapfile || depth) return;
- +
- + if (!*user) return;
- +
- + if (!initialised) {
- + *last_from = *last_to = 0;
- + initialised = True;
- + }
- +
- + if (strequal(user,last_to)) return;
- +
- + if (strequal(user,last_from)) {
- + DEBUG(3,("Mapped user %s to %s\n",user,last_to));
- + strcpy(user,last_to);
- + return;
- + }
- +
- + f = fopen(mapfile,"r");
- + if (!f) {
- + DEBUG(0,("can't open username map %s\n",mapfile));
- + return;
- + }
- +
- + DEBUG(4,("Scanning username map %s\n",mapfile));
- +
- + depth++;
- +
- + for (; (s=fgets_slash(NULL,80,f)); free(s)) {
- + char *unixname = s;
- + char *dosname = strchr(unixname,'=');
- +
- + if (!dosname) continue;
- + *dosname++ = 0;
- +
- + while (isspace(*unixname)) unixname++;
- + if (!*unixname || strchr("#;",*unixname)) continue;
- +
- + {
- + int l = strlen(unixname);
- + while (l && isspace(unixname[l-1])) {
- + unixname[l-1] = 0;
- + l--;
- + }
- + }
- +
- + if (strchr(dosname,'*') || user_in_list(user,dosname)) {
- + DEBUG(3,("Mapped user %s to %s\n",user,unixname));
- + StrnCpy(last_from,user,sizeof(last_from)-1);
- + sscanf(unixname,"%s",user);
- + StrnCpy(last_to,user,sizeof(last_to)-1);
- + }
- + }
- +
- + fclose(f);
- +
- + depth--;
- +}
- +
- +/****************************************************************************
- +internals of Get_Pwnam wrapper
- +****************************************************************************/
- +static struct passwd *_Get_Pwnam(char *s)
- +{
- + struct passwd *ret;
- +
- + ret = getpwnam(s);
- + if (ret)
- + {
- +#ifdef GETPWANAM
- + struct passwd_adjunct *pwret;
- + pwret = getpwanam(s);
- + if (pwret)
- + {
- + free(ret->pw_passwd);
- + ret->pw_passwd = pwret->pwa_passwd;
- + }
- +#endif
- +
- +#if defined(NEXT)&&defined(i386)
- + /* Workaround for NS 3.2 posix bug in getpwnam() */
- + if (!ret->pw_uid && ret->pw_short_pad1)
- + ret->pw_uid = ret->pw_short_pad1;
- + if (!ret->pw_gid && ret->pw_short_pad2)
- + ret->pw_gid = ret->pw_short_pad2;
- +#endif
- +
- + }
- +
- + return(ret);
- +}
- +
- +
- +/****************************************************************************
- +a wrapper for getpwnam() that tries with all lower and all upper case
- +if the initial name fails. Also tried with first letter capitalised
- +Note that this changes user!
- +****************************************************************************/
- +struct passwd *Get_Pwnam(char *user,BOOL allow_change)
- +{
- + fstring user2;
- +
- + struct passwd *ret;
- +
- + if (!user || !(*user))
- + return(NULL);
- +
- + StrnCpy(user2,user,sizeof(user2)-1);
- +
- + if (!allow_change) {
- + user = &user2[0];
- + }
- +
- + map_username(user);
- +
- + ret = _Get_Pwnam(user);
- + if (ret) return(ret);
- +
- + strlower(user);
- + ret = _Get_Pwnam(user);
- + if (ret) return(ret);
- +
- + strupper(user);
- + ret = _Get_Pwnam(user);
- + if (ret) return(ret);
- +
- + /* try with first letter capitalised */
- + if (strlen(user) > 1)
- + strlower(user+1);
- + ret = _Get_Pwnam(user);
- + if (ret) return(ret);
- +
- + if (allow_change)
- + strcpy(user,user2);
- +
- + return(NULL);
- +}
- +
- +
- +/****************************************************************************
- +check if a user is in a user list
- +****************************************************************************/
- +BOOL user_in_list(char *user,char *list)
- +{
- + pstring list2;
- + char *p;
- +
- + strcpy(list2,list);
- +
- + for (p = strtok(list2,LIST_SEP); p; p = strtok(NULL,LIST_SEP))
- + {
- + if (strequal(user,p))
- + return(True);
- +#if HAVE_GETGRNAM
- + if (*p == '@')
- + {
- + struct group *gptr;
- + char **member;
- + struct passwd *pass = Get_Pwnam(user,False);
- +
- + if (pass) {
- + gptr = getgrgid(pass->pw_gid);
- + if (gptr && strequal(gptr->gr_name,p+1))
- + return(True);
- + }
- +
- + gptr = (struct group *)getgrnam(p+1);
- +
- + if (gptr)
- + {
- + member = gptr->gr_mem;
- + while (member && *member)
- + {
- + if (strequal(*member,user))
- + return(True);
- + member++;
- + }
- + }
- + }
- +#endif
- + }
- + return(False);
- +}
- +
- +
- diff -u -r --new-file last-version/source/util.c samba-1.9.14alpha9/source/util.c
- --- last-version/source/util.c Thu Jul 6 17:59:44 1995
- +++ samba-1.9.14alpha9/source/util.c Fri Jul 7 15:03:59 1995
- @@ -2523,7 +2523,7 @@
- /****************************************************************************
- check if a string is part of a list
- ****************************************************************************/
- -BOOL in_list(char *s,char *list,BOOL case_sensitive)
- +BOOL in_list(char *s,char *list,BOOL casesensitive)
- {
- char *listcopy;
- char *t;
- @@ -2536,7 +2536,7 @@
-
- for (t=strtok(listcopy,LIST_SEP); t; t = strtok(NULL,LIST_SEP))
- {
- - if (case_sensitive)
- + if (casesensitive)
- {
- if (strcmp(t,s) == 0)
- {
- @@ -3885,6 +3885,17 @@
- sigunblock(block_mask);
- #endif
- }
- +
- +#if AJT
- +/*******************************************************************
- +my own panic function - not suitable for general use
- +********************************************************************/
- +void ajt_panic(void)
- +{
- + pstring cmd = "/usr/bin/X11/xedit -display :0 /tmp/ERROR_FAULT &";
- + smbrun(cmd,NULL);
- +}
- +#endif
-
- #ifdef USE_DIRECT
- #define DIRECT direct
- diff -u -r --new-file last-version/source/version.h samba-1.9.14alpha9/source/version.h
- --- last-version/source/version.h Thu Jul 6 18:11:04 1995
- +++ samba-1.9.14alpha9/source/version.h Sun Jul 9 16:54:33 1995
- @@ -1 +1 @@
- -#define VERSION "1.9.14alpha8"
- +#define VERSION "1.9.14alpha9"
-